put first word of the name of the target into StackLocation
visual effect scroll right
--go to previous card
go to previous card of this background
put "Card" && the number of this card into NewPrevName
put "of" && the number of cards into NewNextName
set the name of the target to NewPrevName
if NextID is empty then exit mouseDown
if StackLocation is "Card" then
set the name of card button ID NextID to NewNextName
else
set the name of background button ID NextID to NewNextName
end if
end mouseDown
on mouseStillDown
mouseDown
end mouseStillDown
-- part 14 (button)
-- low flags: 00
-- high flags: A000
-- rect: left=341 top=17 right=63 bottom=396
-- title width / last selected line: 0
-- icon id / first selected line: 32650 / 32650
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: of 17
----- HyperTalk script -----
on mouseDown
Global PrevID, NextID
put the ID of the target into NextID
put first word of the name of the target into StackLocation
visual effect scroll left
--go to next card
go to next card of this background
put "Card" && the number of this card into NewPrevName
put "of" && the number of cards into NewNextName
set the name of the target to NewNextName
if PrevID is empty then exit mouseDown
if StackLocation is "Card" then
set the name of card button ID PrevID to NewPrevName
else
set the name of background button ID PrevID to NewPrevName
end if
end mouseDown
on mouseStillDown
mouseDown
end mouseStillDown
-- part 15 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=368 top=270 right=283 bottom=437
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Button
----- HyperTalk script -----
on mouseUp
edit script of this background
end mouseUp
-- part contents for background part 8
----- text -----
Card 9 of 20
-- part contents for background part 9
----- text -----
BROWSING ARROWS
These arrow will take you through each card in the stack. These arrows will continue from card to card if you keep the mouse button held down.
As you go from card to card, the names of the buttons, which show the number of this card and the number of cards, also change.
Another way to keep track of the card numbers of the cards, is to put a field on the card (below) and use a script for the background. See the script 'On OpenCard' located in the script of the background. If you choose to use this alternative, you will be using up disk space because every card will have a field with this information in it.
-- part contents for card part 10
----- text -----
Note: The arrow buttons above are currently set to work on any stack by simply pasting them on to any background. NO OTHER SCRIPTING IS NECESSARY, but because of their programming, you would have to click on both buttons to register their ID numbers to get them both working. A better alternative is to use the buttons and scripts below.
NOTE: The above buttons will not work now because they are not pasted on the background.
-- part contents for card part 9
----- text -----
The arrow buttons below, use a script located in the background (see "on opencard")